<?php

/**
 * @author Martin Pernica
 * @copyright 2009
 */
ob_start();
require '../../../config.php';
require '../../../libs/Framework/Lang.php';

$query = $GLOBALS['db']->query("SELECT * FROM {prefix}users WHERE id = '" . intval($_GET['id']) . "' LIMIT 1");
$data = $query->fetch_array();
if (empty($data)) {
    header("HTTP/1.0 404 Not Found");
} else {


    function addLine($text, $data)
    {
        echo '<p><strong>' . $text . '</strong> &#187; ' . $data . '</p>';
    }

    addLine(Lang::getFront('com_user', 'nickname'), $data['display_name']);
    addLine(Lang::getFront('com_user', 'fullname'), $data['real_name']);
    echo '<p><img src="' . $GLOBALS['url'] . '../avatars/' . $data['avatar'] .
        '" alt="avatar" /></p>';
    addLine(Lang::getFront('com_user', 'registered_from'), $data['created']);
    if ($data['display_email'] == 1) {
        addLine(Lang::getFront('com_user', 'email'), $data['email']);
    }
    addLine(Lang::getFront('com_user', 'birthday'), $data['birthday']);
    addLine(Lang::getFront('com_user', 'gender'), $data['gender']);
    addLine(Lang::getFront('com_user', 'website'), '<a href="' . $data['website'] .
        '" target="_blank">' . $data['website'] . '</a>');

}
ob_end_flush();
?>